home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
19
/
9
/
DISK1992.ZIP
/
GB11-2.EXE
/
MGHELP.DAT
< prev
next >
Wrap
Text File
|
1989-06-01
|
88KB
|
2,644 lines
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 1
ENTRY SCREEN
This is Magic PC's Entry Screen. The name of the
owner of the software appears in the upper
left-hand corner. The Date field will show
either the date given by the user at the DOS
level, or, in the event that no date has been
supplied, the date entered in the last Magic PC
session. The default date can be overridden by
typing a different date in 6 digits, with no
intervening slashes. You can use the Backspace
key to correct errors before pressing the
<Enter> to accept the date and enter Magic PC.
F1 - (Opt): Installation Menu
F9 - (End): Exit to DOS.
F10 - (?): How to use Help.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 2
USER MENUS
Magic PC has three User Menu levels: System
Menu, Sub-System Menus, and Program Menus. These
menus are nested. Making a selection from any of
the menus is consistent throughout Magic PC:
Either type the number of your choice and an
<Enter>, or use the arrow keys to highlight your
selection, then press <Enter>. In a two column
menu, the Right and Left Arrow Keys are also
operative.
You can use the Home Key to highlight the first
menu entry and the End Key to highlight the
last. To leave a menu and go back to the
previous level, press F9 (End). Note that the
selection you originally made will remain
highlighted when returning to that level.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 17
SORT TABLE
In the Sort Table, you choose the fields by
which the records will be sorted, determine the
size of the segment if the field is alphanumeric
and whether the Sort is done in Ascending or
Descending order. You can sort by a combination
of up to 10 different fields. Press F4 to open
new lines in the table. When you are ready,
press F9 to accept your selections.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 39
HOW TO USE HELP
Magic PC provides you with context-sensitive
help screens. There are 2 levels of help in the
Design Module, and 4 levels of help at Runtime.
Design Module:
Press F10 whenever a new window is displayed and
you will see the help information relevant to
that subject. If it is a selection menu, choose
the entry you need and then press F10 for help
on that entry. From any help screen you can
press F10 again to display this "HOW TO USE
HELP" screen. To exit, press F9 (End) for every
F10 you have entered.
At Runtime:
The designer can prepare a field-sensitive help
screen for the end-user and also one common help
screen for the entire Task. The end-user can
invoke 4 levels of help by pressing F10 four
times: The field level help, the Task level
help, the User Options Help, and finally this
"HOW TO USE HELP" The first two levels are
prepared by the designer and stored in the
XXCTL.DAT file as part of the application, and
the last 2 levels are stored in the MGHELP.DAT
file.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 44
USER OPTIONS
The User Options menu is available by pressing
F1 from within a Magic PC program. It offers a
selection of different modes to run the program
(Modify, Create and Query), and also provides
for a comprehensive set of operations to
manipulate the data (Locate records, limit
ranges of records, sort, dynamically change the
current key, and control the input/output
destination).
At times, the system designer may decide to
disable some of the modes and operations, or
even eliminate the access to the User Options
menu altogether, in which case the F1 will not
be highlighted at the bottom of the screen.
Within the User Options menu you have the
following methods of making your selection:
1. Use the directional keys to highlight your
selection, then <Enter> to accept it.
2. Type in the number of the option you wish to
select, then <Enter>.
3. Press the Function key with the same number
as the option you want to select.
Once you are familiar with the options, you can
press F1 and the respective F key consecutively
to get quickly to the requested option. The User
Options window will not open. For example, if
you press F1 F4 from any point in the program,
Magic PC will automatically display the Locate
screen and you can enter the information
required to locate the specific record
immediately.
The User Options menu is split into two parts:
the first three selections are the
available modes of operation. The remainder are
special requests which can be made to manipulate
the Data View. The Modes of Operation are:
Modify (F1):
In this mode, you can change data in existing
records.
Create (F2):
In this mode, you can create new records.
Pressing Down Arrow will confirm the record and
present a new screen or line for input. The Up
Arrow will go to previously entered records and
allow you to change your data.
Note, however, that the range of records
available for modification while in Create mode
is limited to those records created since you
last entered this mode. In this way, you can
refer to the "family" of records entered while
in the same Create session.
Query (F3):
The only operation allowed in this mode is
scanning through the records and fields using
the Directional Keys. An attempt to change a
data field will result in a beep.
Note:
-----
In Batch type programs (reports, vertical
updates, etc.) the F1 through F3 above are
replaced by "F1: Run" only, since the above
modes are irrelevant in this case. Select F1 to
run the program after you employed the
operations described below.
Locate (F4):
When choosing the Locate option, the Task screen
will appear with "Masks" covering all fields.
The cursor rests on the current Key Field making
it easy to ask for the most common search
request - by key. Enter your requested key and
press F9 to execute the search. Magic PC will
search for the requested record from the current
record on, up to the end of the file (or the
current Data View). If found, the requested
record will show immediately. If not, the next
record will be shown and the appropriate message
will be displayed. Note that if you would like
the search to start from the beginning of the
file, you must position your cursor at the very
first record, simply by pressing the Home key
prior to entering the Options Menu. (for a line
mode window, press Home twice: the first will
move the cursor to the first line in the screen,
and the second to the top of the file.)
If the field(s) participating in the search
request are the current key fields, the result
will be almost immediate. If not, the file will
be scanned sequentially. Also note that the key
search will be made on the current key. To
change the current key, use the Key (F6) option
before executing the search.
While the simplest type of Locate operation
would be to search for a record by its key, it
is also possible to search using a From/To
Range. In this case, you would first type in the
data relating to where you want to start the
search (From), then press F8 to switch over to
the To: prompt. The masking will appear again,
and you can then type in the data pertaining to
the point where you want to stop the search over
the previous entry. The first record within that
set which matches your criteria, will be
displayed. If no such record is found, the
cursor will be positioned on the next record by
key.
The F7 and F8 keys will work as a toggle,
alternately displaying your first (From:) and
second (To:) entries. As usual, F9 will execute
the search.
The third method of using the Locate option is
with an expression. Press F6 (Expr) and enter
the Expression table. You can enter any logical
expression, and the system will search for the
first record which fits that expression.
Within a search screen, the Delete key (F3) will
delete all selection criteria, while the Nullify
key (F4) will only delete a single entry.
Range (F5):
You can set the Range of records which
participate in the task (called the Data View),
overriding the range predetermined by the system
designer. This Range stays active as long as you
remain in the Task or until the entries are
deleted or changed.
The Range Option has the same levels as the
Locate option (see above). You can give a Range
From a field To a field, using F7 and F8 (From:
To:), or by expression. The Range operation,
however, will display not one record, but a
group of records which fit the Range criteria.
As usual, you exit from the definition screen
with F9, thereby accepting the current Range
definition, and starting the Range operation.
Key (F6):
Using this option you can change the Main Key of
the task and display the records according to
the new key. To do that you must Zoom into the
Key Table and define the new key.
The new key will remain active until changed or
the user leaves the task. As mentioned above,
before initiating a search, you can redefine the
key of the Data View.
You can choose Key 0 (no key at all), by going
to the top of the Key name Table (above the
first key), and leaving with F9. This will
display the records in the physical order they
appear in the data file.
Sort (F7):
The Sort Option allows a User to perform an
online sort by up to ten Ascending or Descending
Keys.
A Sort Operation will override the active key.
The new sort remains active until the User has
either left the task, or canceled the sort
definition.
Files (F8):
This option refers to Input/Output Files. In the
program, the designer gives a name to the I/O
files. This is especially useful in Batch type
tasks printing reports. If no name is given, the
file is sent to the Printer with the default
name PRN: The User can, at this point, change
the name of the Output file, sending the Output
to disk file or to the console.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 45
EXPRESSION TABLE
You can enter any legal mathematical or logical
expression following the conventional algebraic
rules, using the Magic PC Functions.
Use the letters assigned to all the selected
fields, in the list on the left of your screen.
Zoom if the list is too long to be displayed all
at once on the screen, and scroll to view the
entire list. Return with F9.
Enter your expression in the table and <Enter>.
It is translated automatically to display the
field names instead of the letter codes.
If an error is detected in the expression, only
the part up to the error is displayed. Use the
Edit mode (Esc) to correct your error.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 46
I/O TABLE
In this Table you can redefine the file
destination.
The default destination for an Output file is
PRN: or the Printer. To see the report displayed
on the screen, enter CON: or "console" (without
the quotes). To send the report to a disk file,
enter the DOS file name. Then press F9, and F1
to run the program.
Another parameter you can change is the number
of lines per page. The default is 60.
As always, the output file definition you make
will remain in effect until it is changed back
or you have left this task.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 53
LOGON WINDOW
Enter your User ID and press <Enter>. Now enter
your password and press <Enter>. Magic PC will
not display the password on the screen, and will
always proceed to the next screen. Your User ID
and password will be validated only when you
enter a specific system in the System Menu.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 3
CONVERT UTILITY
This important utility is used to reorganize
data files and/or perform conversion of data in
the process.
It is strongly recommended that you backup the
original data file before starting this
procedure since, at its conclusion, the original
file will be replaced with the new one.
You should have enough room on your disk for the
new file, since the old one will remain on the
disk until the process is completed.
The Convert utility must be run any time you
change the definition of fields or keys in the
Data Dictionary, for existing data files.
To convert, enter the Data Dictionary, make the
requested change to the field definitions, and
any changes to the keys. Before leaving the file
line in the Data Dictionary Table, you must
press the F7 (Convert) key. This timing is
critical because, as long as you remain on the
file line, Magic PC remembers the old definition
of the file and its keys and is able to perform
the conversion. Once you leave the line, it is
no longer possible to run the utility!!
Since it is so crucial to run the Convert on
time, Magic PC displays a warning message
anytime you change anything in the Data
Dictionary. If data files exist at the time the
change is made you must run the convert. You
should, however, make all the changes to the
file before you convert. This includes the
changes to the Fields and the Keys.
You can alter anything in the file and key
definitions:
Add a field anywhere in the file.
Delete records.
Change attributes.
Add or delete keys.
Switch between Unique and Non-unique.
Add or delete segments.
If changing attributes of fields, Magic PC
attempts to convert the Data types. If inserting
new fields, they will be assigned zero or
blanks.
You can zoom on the Scan key to get the list of
the file's keys. Choosing the key will cause a
scan of the existing file in that key order, and
the creation of the new file by that key. This
ensures that the physical order of the records
in the new file will equal the logical order by
the selected key, thereby guaranteeing the best
performance in scanning the file or any I/O
operation.
If you choose Key 0, the current file will be
scanned sequentially. Use Key 0 to recover
damaged files, since Magic PC will reconstruct
the keys and data automatically.
Another benefit of the reorganization process is
the fact that records which were marked as
deleted and have not yet been reused, are not
copied to the new file. This is the "packing"
operation of Magic PC, which will decrease the
physical size of the file.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 4
DISPLAY FIELD SCREEN
This screen is used to select a field to be
displayed on the screen. Zoom to the left column
and highlight the field you want to display and
return with F9. The description will appear
automatically on the screen. If you skip to the
EXPression column, you can Zoom to the
Expression Table and select an expression whose
result will be displayed on the screen.
Auto Skip: If Y, the field will be automatically
skipped when filled with data.
Commas: If Y, numeric fields will show with
commas separating the thousands.
Negative: If Y, negative values are allowed.
Blank When Zero: If Y, numeric fields will be
displayed as blanks when their value is zero.
Leading Zeros: If Y, displays leading zeros for
numeric fields.
Uppercase: If Y, converts all lowercase letters
to uppercase.
Pos: You can override the default position of
the displayed field.
Size: Allows override of the default size of the
field. Note that you can split an alphanumeric
field into multiple lines. Enter, for example,
(2,15) for a field of length [30].
Decs: Allows override of the number of displayed
decimal places.
Help: Zoom to the Help Table to define and
select the help screen for this field.
You can leave this screen in one of three modes:
1. Press F9 to display the field on the screen
at the specified position.
2. Press F7 to display the field and its title
next to it in Screen Mode.
3. Press F8 to display the field and its title
above it in Line Mode.
As always, pressing F2 leaves the screen making
no field selection.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 5
DESIGNER OPTIONS MENU
This menu gives you access to all of the
designing capabilities of Magic PC once you
enter a specific application. On the System Menu
level, only the Menu maintenance option is
available.
Use the Directional Keys and <Enter> to make
your selection, or press the appropriate
Function Key.
This is a general description of all the
options. For more specific help, choose one of
the options and request help on that level.
Designing Options:
Choose options F1 through F5 to design the
Menus, Data Dictionary, Programs, Help Screens
and User IDs of your application.
Print/Export/Import Options:
F6 will print or export Menus, Data Dictionary
Programs, Help Screens and User ID. If you
choose the Document options Magic PC will print
a detail document of all the application system
elements.
If you choose Internal format printing, Magic PC
will export the system's elements in internal
format. Then you can import it back using F7 -
the Dictionary Import utility. This feature will
help you to achieve the following:
1. To copy and modify existing programs, using
them as templates or as the basis for similar
systems.
2. If a few designers implement the system in
parallel, you can export all their Control
Files, and merge all of them by importing them
into one consolidated file.
3. If your XXCTL.DAT file is damaged, you can
dump all 5 system element using Internal format,
then open a new system and import all the files
back in. Importing should be done in this order:
Data Dictionary, Help Screens, User ID, Programs
and Menus.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 6
SYSTEM MENU MAINTENANCE
System Description:
The system name as it shows in the System Menu.
Control:
Enter two alpha characters to identify the
Control File. If XX is entered, Magic PC will
use XXCTL.DAT as the Control File. You can press
F6 to widen the input area and then enter a DOS
path name. D:\MAGIC\XX will cause Magic PC to
look for the XXCTL.DAT file in the D:\MAGIC
directory. Press F6 again or <Enter> to shrink
the input area.
Data:
Enter two alpha characters to identify the data
files. If XX is entered, Magic PC will use
XXFILYYY.DAT for the data file. Enter a path
name in a similar way to the Programs entry
explained above.
Sub-System, Program:
Enter the Sub-System number and/or the Program
number you would like the end user to go to
directly from the Entry Screen. In this case the
System Menu will be skipped (only when using the
stand alone Runtime module) and the
corresponding Sub-System or Program will be
displayed. See chapter 5 in the documentation
for details.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 7
SUB-SYSTEM MENU
This table is used to describe the different
Sub-systems. The break-down into Sub-systems is
a logical split of the different parts of the
system for the user's convenience. All
Sub-Systems use the same System Control File,
containing the Data and Program Dictionaries.
As in all tables, the F4 key is used to create a
new line, F2 to cancel the operation, and F3 to
delete a line.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 8
PROGRAM MENU
Program Description:
The program name is automatically copied to this
column from the Program Table when you zoom on
the No. column to select a program. You can then
override the name in those cases that you would
like to display a different name in the Program
Menu.
No. :
Zoom to select a program from the Program Table,
or type in the program number.
Parameter:
If the No. column is 0, and this column is not
blank, then Magic PC invokes the command
processor (as specified in the Environment
Screen), and passes to it the Parameter line for
execution. Upon termination, control
automatically returns to Magic PC. If the
Parameter is DOS, then control is transferred to
DOS, until the user types EXIT at which point
control returns to Magic PC.
Cls:
If Yes, the Magic PC screen is cleared before
leaving to DOS. If No, the screen is not
cleared.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 9
DATA DICTIONARY
The Data Dictionary is part of the System
Control File and is made up of all File, Field
and Key Definitions.
All Database Files are defined in this table.
The only information you can enter on this table
is the File Name. All other columns are for
display only and should be Zoomed on. The files
are automatically numbered as you create them
(F4). The File number (YYY) in this table
corresponds to the physical file name
(XXFILYYY.DAT).
F7 - Convert: Run the Convert Utility after
changing the Data Dictionary and before leaving
the file line.
F8 - Checker: Run the Checker to check the
file's definitions.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 10
FIELDS
Field Types:
(A) Alphanumeric - Where the size of the field
is specified in bytes, up to the maximum record
size (2K).
(I) Integer - A 2 byte signed (+/-) Numeric
field of up to 4 digits.
(L) Long Integer - A 4 byte signed (+/-) Numeric
field of up to 9 digits.
(R) Real - A 4 byte signed (+/-) Numeric field
with a decimal point, in a combination of 6
digits, from (-0.000001 to 999999).
(E) Extended - An 8 byte signed (+/-) Numeric
field with a decimal point, in a combination of
14 digits.
(D) Date - Stored internally as a 4 byte
integer, where 01/01/1901 is equal to 1.
Therefore, it is possible to carry out
arithmetic operations on the data.
(T) Time - Stored internally as a 4 byte
integer, counting seconds from midnight.
Therefore, it is possible to carry out
arithmetic operations on the data.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 11
KEYS
Any field or combination of fields in a file can
be defined as a key, which is either Unique or
Non-Unique. One file can have multiple keys. In
this case, the file will be pre-sorted according
to all keys. The User can switch immediately
from one sort order to another, and will not
have to wait for an external sort.
A key is made up of segments. A segment of a key
can be either an entire field or a part of it,
if alphanumeric. The order can be either
Ascending or Descending, unless the Type is I,
L, or D, in which case the key can be Ascending
only.
The Key definition screen is actually made up of
two tables. The upper section lists the
different keys in the file. When the key you
wish to handle is highlighted, the segments of
that key will appear in the table at the lower
right. Indeed, you need only Zoom on your
selection in the upper table to get to the
details in the lower. This is where you choose
the fields which will make up the segments of
your key. The size is computed automatically,
unless you have chosen an alphanumeric field, in
which case, the cursor will stop on the Size
column and await your input. You must also
decide whether the segment is sorted in
Ascending or Descending order (A or D). After
specifying the details of the key, the F9 key
will bring you back to the upper table.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 12
PROGRAM TABLE
This is the Program Description Table. The
column on the left represents the program
numbers, which are automatically assigned by the
system. The programs can be called by these
numbers either within another program or on the
Menu Maintenance screen. To create a new entry,
press the F4 (Add) key, which will insert a new
line wherever you are in the table. If a new
program is inserted in the middle of the list,
the other programs will be automatically
renumbered throughout the System.
A Program is made up of a series of Tasks and
Sub-Tasks which can be nested. A Task is
comprised of a Task Header and the Execution
Definition of that Task. To enter a Program's
first Task Header, ZOOM (F5) on the Program
Name.
F8: - Run the Checker to check your program
before you run it.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 13
TASK HEADER
The Task Header has two major purposes. First,
it defines the general Data View, by choosing
the Main File for the Task along with one of its
keys which is used to define the record
sequence. Second, it provides information
pertaining to the Task, such as, the Mode of
Operation, the Task Type, etc. Essential
information is provided on the first screen.
Less frequently used parameters are entered on
the More Information screen, which is reached by
Zooming (F5) on the More Information parameter
at the bottom of the screen.
Task Description:
This description is copied automatically from
the Program Description Table.
Main File:
The major file of this Task. All other Database
files used by the Task are Linked Files. The
Zoom key (F5) is active on this field, and you
can choose the file you need from the File
Description Table.
Key:
The default key for this Task selected from the
Key window. Use the Zoom to make this selection,
returning with F9. If the Key is defined here as
zero (0), then you can Zoom to the Expression
Table and write an expression which results in a
number. This will be the Key number to be used
by the Task.
Mode:
The default mode in which the Task will start
when first run by the User. This mode can be
changed by the User in the User Options Menu.
Press the ? key to see a list of the various
Modes available for this parameter.
If Options (O) is given as the Mode of Operation
default, the User will see the Option Menu upon
entering the Task, and will then choose which
Mode he wants to use.
Entering a blank will give access to the
Expression Table. This expression should yield
one of the characters above.
Task Type:
This parameter is a major branching point in
Task definitions. This is where you define
whether a Task is On-line or Batch. All
following definitions and Execution Operations
will depend on this parameter.
Task Size:
This parameter automatically displays the amount
of memory used by the Task.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 14
TABLE SELECTION
To select from a table, use the directional keys
to highlight your choice and press F9 to leave
the table. If you press F2, you leave the table
making no selection and the previous entry
remains.
Note that the cursor might show above the first
entry of the table, when the selection is zero.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 15
MORE INFO
Open Files
----------
DB:
Describes Magic PC's Database Files
participating in the Task. ZOOM to the DB Table
to display the Help for this entry.
I/O:
Zoom on this field to define Input or Output
Files to correspond respectively with the Read
and Write File Operations in the Task Execution
Table. Zoom to the I/O Table to display its
Help.
Modifiable (Y/N)
----------------
The various "Modifiable" parameters will be used
by the designer to limit the options available
to the user at Runtime:
Options (Y/N):
When set to N, the User Options Menu is not
accessible to the user (F1 is not highlighted)
both in Batch and Online Task. This overrides
all the other Modifiable entries below.
Modify/Create/Delete (Y/N):
Whether or not the user can use these modes for
this Task.
Locate/Range (Y/N):
Whether or not the user can change the Locate or
Range expression in the More Info screen.
Key (Y/N):
Whether or not the user can change the Key which
was specified in the Task Header.
Sort (Y/N):
Whether the user has a Sort option. In addition,
if you ZOOM in on this parameter, you can
predetermine the sort sequence for the Task in
the Sort Table.
I/O Files:
Whether or not the user can change the Input
Output files defined in the I/O Table in the
More Info Screen.
Expression for
--------------
Expression for Locate:
Positions the cursor on the first record that
qualifies for this expression. The range is not
limited.
Expression for Range:
Predetermines the range of records participating
in the Task, to those which give a True result
to the expression.
Expression for End:
An expression which will define an End Condition
for the Task. Typically, an On-line Task ends
when the User presses the F9 key. A Batch Task
ends when all records have been processed. If
you want to set a different criterion for ending
a Task, you can specify an expression at this
parameter.
Expression for Delete:
This Expression is only used in Batch Tasks and
serves as a criterion to delete records from the
File. In this case, every record that the
expression evaluates to 'TRUE'L will be deleted
from the File.
Form Lines:
Used for Pre-Printed Form processing. For
example, if there is only room for 6 Item Lines
in an Order Entry Form, choose 6 for this
parameter.
Task Help:
Zoom to define the global Help Screen for the
Task. This Number can also be set from the Main
Screen for the Task.
Conditions (Y/N)
----------------
Open Window:
This parameter will determine whether or not the
Task has its own window. If No (N), the Task
uses the Father Task's window and special care
must be taken.
Close Window:
If Open Window=N (above) then if Close Window is
set to N, the Window Area on the Father Task
which belongs to this Task - is not erased when
leaving the Task.
Record Cycle:
If Y, after entering the last field of a record
the cursor comes back to the first field,
cycling on the same record. To go on to the next
record automatically after accepting the last
field of the record, change this parameter to N.
Repaint Screen:
If Y, the screen is painted every time a Record
Suffix is completed. This should be used only
when necessary, since in most cases (in the
default N setting) the screen is only repainted
when needed.
Resident Task:
If Y, then the Task is loaded to memory when its
Father is loaded, and is only released when the
Father Task is terminated. This is especially
useful for sub-tasks which are called frequently
from Father tasks, since the disk I/O time is
eliminated.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 16
EXPRESSION TABLE
F4 opens a new line in this table. Press the End
key first if you want to add an expression to
the bottom of the table.
Each entry in the table evaluates to one of the
following: String, Numeric, or Logical (True or
False).
You can enter any legal mathematical or logical
expression following the conventional algebraic
rules, using the Magic PC Functions. Use the
letters assigned to all the selected fields,
from the top task down to the current one. Zoom
if the list is too long to be displayed all at
once on the screen, and scroll to view the
entire list. Return with F9. The expression is
translated automatically to display the field
names instead of the letter codes.
If an error is detected in the expression, only
the part up to the error is displayed. Use the
Edit mode (Esc) to correct your error.
If the expression is longer than the space
allowed in the table, press F6 (Wide). Nine
lines of 25 characters each are given for the
expression. Press F6 again to return to the
table. Other Available Function Keys:
(F2) Undo: Leaves the table without changing the
entry in the task.
(F3) Delete: Deletes an entry from the table.
(F4) Add: Creates a new entry in the table.
@: (At-sign to Copy): Enter @ as your first
character in the expression, then follow it by
existing Expression number and <Enter>,that
Expression will be copied to the this entry.
FUNCTION LIST
-------------
The following screens display a list of Magic PC
Functions, along with their parameters (Parms),
the type they return (Ret), and a brief
description. The list is organized by Function
type. Use this list as a quick reference to
verify the format of a specific Function. The
complete list sorted alphabetically is available
in Chapter 10 of the Reference Manual.
Literals
--------
Alphanumeric 'abc1234$%*'
Numeric -123.45
Date '01/01/86'D
Time '12:30:00'T
Logical 'TRUE'L or 'FALSE'L
Operators:
Mathematical
------------
+ Addition of two numbers
- Subtraction of two numbers
* Multiplication of two numbers
/ Division of two numbers
^ Exponentiation
MOD Modulus:the remainder of a division.
-( ) Changing the sign of an expression.
Logical
-------
= Equation
<> Not Equal
<= Less than or equal to
< Less than
>= Greater than or equal to
> Greater than
NOT Negation
AND And
OR Or
String
------
& string concatenation.
Date Functions:
Name Parms Ret Description
------------------------------------
DATE date System date
DAY date num Day number (1-31)
MONTH date num Month number (1-12)
YEAR date num Year (1901-up)
DOW date num Day-Of-Week (1-7)
CDOW date str 'Sunday','Monday'...
NDOW num str 'Sunday','Monday'...
CMONTH date str 'January','February'
NMONTH num str 'January','February'
DSTR date,mode str date to string
DVAL str date string to date
Time Functions:
Name Parms Ret Description
------------------------------------
TIME time System time
HOUR time num Hours (0-99
MINUTE time num Minutes (0-59)
SECOND time num Seconds (0-59)
TSTR time,mode str time to string
TVAL str time string to time
Mathematical Functions:
Name Parms Ret Description
-----------------------------------------
ABS num num Absolute value
MOD num MOD num num Modulus
FIX num,whole,dec num Truncate num.
ROUND num,whole,dec num Rounds numbers
LOG num num Natural log.
Trigonometric Functions:
Name Parms Ret Description
------------------------------------
COS rad num Cosine
SIN rad num Sine
TAN rad num Tangent
ACOS num rad Arc Cosine
ASIN num rad Arc Sine
ATAN num rad Arc Tangent
String Manipulation:
Name Parms Ret Description
----------------------------------------------
DEL str,pos,len str Delete
INS str1,str2,pos,len str Insert
REP str1,str2,pos,len str Replace
MID str,pos,len str Substring
LTRIM str str Left Trim
RTRIM str str Right Trim
LEN str num Length
LOWER str str To Lower
UPPER str str To Upper
FILL str,repeat str Fill
INSTR str1,str2 num Locate
Logical Functions:
Name Parms Ret Description
-----------------------------------------
IF log,val1,val2 val Logical If
AND log AND log log Logical And
OR log OR log log Logical Or
NOT NOT log log Logical Not
Type Conversion:
Name Parms Ret Description
-----------------------------------------
ASC str num string to ASCII
CHR num str ASCII to string
STR num,len,dec str number to str.
VAL str num str. to number
Identification:
Name Parms Ret Description
------------------------------------
SYS str System's name
MENU str Sub-System's name
PROG str Program's name
OWNER str Owner's name
PREF str Data files prefix
PATH str DOS path to data files
TERM num Terminal number
USER num User ID number
GROUP num User group number
Tests & Conditions:
Name Parms Ret Description
------------------------------------
EOF Task,file log End-of-File
EOP Task,file log End-of-Page
LINE Task,file num Line number
PAGE Task,file num Page number
STAT Task,str log Task mode
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 18
DB TABLE
This is the DB Table, where all the Database
files opened in the task are defined.
Mode:
Refers to the Mode in which the file is opened.
In a single-user environment the default mode is
A (Accelerated Exclusive). The other option is P
(Pre-Image Exclusive). In this Mode, all entries
are simultaneously written into a preimage file.
In the event of a crash, when Magic PC is
started up again all the lost data will be
automatically re-entered into the system. This
mode will, of course, slow down data entry, and
should only be used when necessary.
In a Multi-user Environment, the Mode parameter
takes on additional meanings.
A file can be opened in Mode A (Accelerated
Exclusive) or P (Pre-Image Exclusive) as in a
single-user environment, where the file is
opened exclusively for this program and cannot
be accessed by any other program at the same
time. Alternatively, a file can be opened in
Record Mode (R) or Shared Mode (S). In Record
Mode, the current record is locked, allowing
other programs to use different records in the
same file, while in Shared mode, programs can
share the file, and therefore should be used for
multiple read-only cases.
Expression:
Allows you to override the default name of the
DB File. You can enter an expression here which
changes the path, drive name and/or file name
for the duration of the Task.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 19
I/O TABLE
The I/O Table must be used to define Input or
Output Files to correspond respectively with the
Read and Write File Operations in the Task
Execution Table.
The first parameter is the File Description or
name. The next parameter defines an Input (I) or
Output (O) file. An additional option is
Sequential Output (S), where no Top of Page mark
is generated by Magic PC in the Output file.
The I/O file name in DOS can be given by Zooming
to the Expression Table. If no expression is
supplied for an Output file name, Magic PC
assumes the name to be 'PRN:' and will send the
output to the printer.
Lines: Refers to the number of lines per page in
an output file. If left as 0, Magic PC uses the
default from the Environment Screen.
Modify Name: and Modify Lines: Either allow or
prevent the User from changing a file name or
destination and the number of lines on a page.
If Yes, the User can reroute a report from the
printer to the console, send it to a disk file
or use different size paper.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 20
EXECUTION TABLE
This level controls the flow of input and the
execution of operations.
The screen is split into two parts. The upper
table shows which level (Record or Task) is
being handled, and the number of operations. The
lower part of the screen shows the details of
the upper table. More specifically, it shows the
Operations which belong to the highlighted entry
in the upper table, either the Prefix, Main or
Suffix operations. To switch between Prefix,
Main and Suffix, use the Left-Right Arrow Keys.
To scroll between the Record to Task Levels, use
the Up and Down Arrow Keys. To enter the desired
lower table (details), press the ZOOM key (F5).
It is very important to understand how to use
the various levels in Batch and On-Line Tasks.
The main purpose of defining an On-Line Task is
to generate an input screen for the end-user.
This screen consists of input fields, display
fields, calculations, windows, branching to
different tasks under certain conditions, etc.
This is called the flow of the task and it is
placed in the Main section of the Record Level.
Once the user has finished his interaction with
a record, a series of operations can take place
automatically before continuing to the next
record. These operations are defined in the
Record Suffix.
Operations carried out on the Task Level are to
be executed either before the Task starts
(Prefix) or at its conclusion (Suffix). The
Prefix operations are executed before the Task
enters the Record Level, and therefore before
the first record is read. The Suffix is a set of
operations which are executed at the conclusion
of the Task, after the last record is read.
A Task Prefix or Suffix is, by definition,
executed only once per Task.
The Batch Task differs from the On-Line Task on
the Record Level in the fact that there is no
user intervention. Therefore, the functions of
the Main section of record level are reduced to
selecting the Data View and assigning initial
values to fields.
The operations to be performed on each record of
the Data View are specified in the Record
Suffix.
The On-Change Block
A major difference between On-Line and Batch
Tasks is the ability to introduce an additional
level between the Record and Task level. You
define a field as the break criterion. This
break criterion will define a block of records
which are similar in at least this aspect.
Once established, the On-Change criterion entry
allows the definition of operations which will
serve as a Prefix and a Suffix to the block. In
the Prefix of an On-Change entry, you would
typically enter operations such as zeroing
counters and printing new headers, while in the
Suffix you would, for example, enter a display
of totals or statistical information.
It is important to note that the moment a change
is recognized, the system performs the
operations specified in the Suffix of the
previous block and then will execute the Prefix
operations of the next block before continuing.
You can enter as many On-Change Block levels as
needed and the system will automatically assume
a break in a lower level when a break takes
place in a higher level.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 49
OPERATION 0 - REMARK
This operation is used to place programming
comments in the tables, or as a separator
between the logical sections of the execution
table.
This is the default where a new operation line
is created (F4). To choose a different
operation, Zoom to the Operations Table.
To enter a remark, move the cursor to the
description column and type the comment. You can
also press F6 to expand the comment line. Use F6
again or press <Enter> to leave the expanded
comment area.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 21
OPERATION 1 - SELECT FIELD
Purpose:
To select a Field from a Database File to
participate in a Task and to define order of
input in an Online Task.
Type : (R)eal or (V)irtual
A (R)eal Field is selected from the current
Database File, either from the file selected as
the Main File, or from the Linked File within a
Begin Link. Any modification of the field's
contents during the Task will be reflected in
the Database File.
A (V)irtual Field is selected from a Virtual
File Definition, and resides in memory only for
the duration of the Task.
Virtual Fields provide temporary storage and
working variables. Values can be assigned to
Virtual Fields, and these values are remembered
until either another value is assigned or Task
termination.
No. :
The Field Number selected from the current file
or virtual file. It is possible to Zoom into the
current file definition for selection, or, in
the case of a virtual field, into a modifiable
virtual file definition which exists only for
this particular Task.
Assign :
An Expression is evaluated and assigned into a
field. Assignment takes place either when the
field is accessed, or as an automatic
recomputing facility whenever any of the
participating fields in the expression are
modified. If an Assign Expression exists when a
record is created, the Expression is evaluated
and assigned into the Field, otherwise the Field
is zeroed/blanked. Fields selected from a Linked
File are an exception to this rule, since these
Fields are read from an existing Record in the
Link File even when creating the Main Record.
When reading an existing record for the purpose
of modifying it, only Virtual Fields are
assigned, since Real Fields already have values
from their files. Virtual Fields without
assignment expressions are not altered.
Input (online) :
An Expression which is evaluated to True or
False. If False, the cursor will rest on the
field when its turn comes up, but input is
disabled. Input is enabled if there is no
expression at this parameter.
Range/Locate:
Pressing the F1 will flip between the Range and
Locate heading over the Min/Max Expressions. At
each mode, the corresponding Min and Max
Expression numbers and the * column options is
displayed.
Minimum, Maximum :
Expressions which are evaluated only once at the
start of the Task and are used to either limit
the records participating in the logical view
(when the Range title is displayed), or to
position the cursor on a specific record (when
the Locate title is displayed).
* : (Y)es or (N)o
Specifies whether the above Minimum/Maximum
criteria are modifiable during Run-Time by the
End User. In critical cases, where the limiting
is crucial to the system design, (N)o should be
specified.
Condition:
If the expression in the condition column
evaluates to False, the cursor will not rest on
the field when its turn comes up, but
assignments will be made.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 22
OPERATION 2 - STOP !!!
Purpose:
To conditionally display a message at the bottom
of the screen.
Show :
Message to be displayed. F6 is a toggle
expanding and shrinking the area, so messages
longer than 20 characters can be typed.
* : (E)rror or (W)arning
If Error is specified and the Condition is True,
then processing stops, the cursor parks on the
previous field, and the user cannot go past the
Stop Operation until the error is corrected. If
Warning is specified and the condition is True,
the message is displayed and the cursor is
positioned in the next field.
Condition:
If True, the Error or Warning are displayed,
otherwise the Stop Operation is skipped, etc.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 23
OPERATIONS 3 & 4 - BEGIN/END LINK
Purpose:
To switch temporarily from the Task Main File to
an alternate Database file, to access data, and
include Linked Fields to the logical Database
view.
File:
Database File to be linked to.
Key:
Key from the Linked File which should be used to
read the Linked Record.
Return:
Select an Integer Variable. If a Record was
found in the Linked File, this Variable will
have a 0, otherwise a 1. An Always type Link
will always return a 1.
*: (N)ormal, (R)ead, (W)rite or (A)lways
When the cursor stands on this field, a window
MUST be opened into a table in which an
expression must be supplied for each Segment of
the Link Key. These expressions will be
evaluated to construct a Key Value, when
attempting to read, and a Record with this key
will be searched for.
(N)ormal attempts to read, and will not allow
continuation unless a record was found. (R)ead
attempts to read, but will allow continuation if
the record wasn't found. (W)rite attempts to
read, and if it doesn't succeed, a record is
created in the Linked File, with the Key
Segments participating in the Link initialized
to the Expression values, and the rest of the
Fields zeroed/blanked. The creation is done
after the Record Suffix has been executed.
(A)lways doesn't attempt to read, but will
create a record as in (W)rite. (Beware of
duplicate key errors!)
Condition:
If a Begin Link is not executed, a Link is still
attempted. Values are assigned to the Linked
Fields as described above. However, any failure
to read is ignored and Linked Fields are
zeroed/blanked. The Condition is ignored in the
End Link Operation.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 24
OPERATION 5 & 6 - BEGIN/END BLOCK
Purpose:
To include several operations in one Block,
which can then either be executed or not.
*: (N)one, (B)efore or (A)fter
If (N)one is selected, the Block is viewed as a
regular operation. As such, it can be executed
or not. If not, all operations in the Block are
not executed, each in its own way. As described
above, even when a Link isn't executed, the Read
is attempted.
(B)efore automatically marks the Block as not
executable. As such, all Operations in the Block
aren't executed, but when standing on the first
Select Field Operation after the End Block, the
F5 (Zoom) will be enabled. By pressing F5,
processing jumps back to the first Operation in
the Block, and the Operations are executed from
there. Usually, after Zoom was selected, the
processing will return to the Select Field from
which it was originally selected.
In an (A)fter Block, the F5 is lit when standing
on the Select Field immediately preceding the
Begin Block, and if selected, jumps forward to
the first Operation in the Block, and continues
from there. Otherwise, the Block isn't executed.
Condition:
If the condition is True, the Block is executed.
Otherwise it is skipped.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 25
OPERATIONS 7 & 8 - EXECUTE TASK/PROGRAM
Purpose:
To execute a new Magic PC Task or Program. The
Task/Program resides within the Current Task,
and recognizes all the current variables, in
addition to its own.
No.:
Task Number from the Task Table, or Program
Number from Program Table.
Parameters:
This mechanism will usually be used when
executing Programs. Zoom to select a list of
variables from the existing variables, to be
passed to the Program. In the Program being
called each variable passed is associated to an
equivalent Virtual Field, starting with the
first Field in the Virtual File Definition. The
Designer must ensure that the Type of each
variable passed is the same as the Type of the
Virtual Field in the called Program. Any
reference to these Virtual Fields in the called
Program will actually be redirected to the
passed variables. This enables calling a Program
to select a value from a table, and having the
Program return the selected value in a
parameter.
Screen :
To select a Display Block, which will override
the called Task/Program's Main Window (Display
Block #1). Allows a Program to be executed with
different sized windows in different positions.
* : (N)one, (B)efore, (A)fter
If (B)efore, then the Program/Task will be
executed only if the Condition is True, and the
user presses F5 (Zoom) when the cursor is on the
field which is defined in the Select Field
Operation immediately following the current Exec
Program/Task Operation.
If (A)fter, then same as (B)efore, except the
Zoom field is defined immediately prior to the
current Exec Program/Task Operation.
If (N)one, then the Zoom option is not available
and the Operation will be executed only if the
Condition is True.
Condition:
If the condition is True, the Task/Program is
executed (only in conjunction with the B/A
option above), otherwise it is skipped.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 26
OPERATION 9 - UPDATE FIELD
Purpose:
To set the value of an Expression into a Field.
No. :
Field Number to Update.
Expression :
Update Expression.
Mod : (N)on-Incremental or (I)ncremental
(N)on-Incremental means that the Expression is
evaluated using current values of all its
variables. The result is set into the Update
Field.
(I)ncremental is actually two updates. First,
the Expression is evaluated using the original
values of all its variables, and the result is
subtracted from the Updated Field. Second, it is
reevaluated using the current values of its
variables, and this result is added to the
Updated Field. This Mode is generally used for
updating a summation variable.
In (I)ncremental Mode the Expression should not
contain a reference to the Update Field itself.
Update a balance by specifying an expression of
'amount'. If totaling in (N)on-Incremental mode,
the Update Field must be part of the Expression,
such as 'balance + amount'.
* : (N)ot Abortable or (A)bortable
Mainly used in nested, Father/Son Tasks, where
the Son Task updates a Field selected in the
Father Task. If (N)ot Abortable is selected, the
Father Task's current record must be completed,
and the user cannot press F2 to cancel it.
Weaker updates should be (A)bortable, allowing
the user to cancel the Father's current record.
For example, assigning a selected value from a
table into a parameter should be (A)bortable.
Condition:
If the condition is True, the Update is
executed. Otherwise it is skipped.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 27
OPERATION 10 - WRITE FILE
Purpose:
To write a Display Block to the printer, an
ASCII file, a disk file, or the console.
Screen :
Select the Display Block to be written.
File :
Select an Output File Number. This File was
previously defined in the 'More Information'
window in the Task Header, in the I/O File
Table.
* : (A)utomatic, (T)op or (S)kip
If (A)utomatic, then when ejecting to a new
page, all the Header Display Blocks in the same
class of the current Display Block are
automatically printed before the current one is
printed.
If (T)op, then the current Display Block is
printed at the top of a new page.
If (S)kip, then the current Display Block is
skipped in case it does not fit in the current
page. The EOF function will return True and the
designer can take special actions based on this
condition.
Condition:
If the condition is True, the Write File is
executed. Otherwise it is skipped.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 28
OPERATION 11 - READ FILE
Purpose:
To input a line from an ASCII file, and set it
into the Task's fields according to a Display
Block.
Screen :
The Display Block with which parsing is to be
done.
File :
An Input File Number must be selected. This File
should have been defined in the 'More
Information' menu at the Task Header, in the I/O
File Table.
Character :
Specifying a delimiting character.
* : (C)olumn, (S)ingle or (D)ouble
(C)olumn Mode parses the Input Line according to
absolute position, as defined in the Display
Block. Care must be taken to match columns with
the ASCII file. (S)ingle mode expects the Input
Values to be separated by the specified
character, where (D)ouble expects the values to
be bracketed by one character before and one
after.
Condition:
If the condition is True, the Read File is
executed. Otherwise it is skipped.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 29
OPERATION 12 - SCAN FILE
Purpose:
To browse and edit an ASCII File.
Name:
An Expression evaluating to the ASCII File name.
Ln: Language. English only in North America.
* : (S)can (E)dit
If Scan then no changes are allowed to the ASCII
file. If Edit, then the end user can modify the
file either by using Magic PC editing
facilities, or by using a text editor that was
defined in the Environment Screen.
Condition:
If the condition is True, the Scan File is
executed. Otherwise it is skipped.
Notes :
The File contents are displayed on the Main
Screen. So as to avoid conflict, a separate Task
should be used for this Operation.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 30
OPERATION 13 - USER EXIT
Purpose:
To execute a DOS command from within a Task.
Expression :
A string Expression evaluating to a Command Line
that is passed to DOS for processing. Upon
termination, control automatically returns to
Magic PC. If the string is 'DOS', then control
is transferred to DOS, until the user types EXIT
at which point control returns to Magic PC.
Cs :
A Yes entry will clear the Magic PC screen
before leaving to DOS. No - will leave the
current screen displayed.
Condition:
If the condition is True, the User Exit is
executed. Otherwise it is skipped.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 31
LINK TABLE
This Table displays all the segments of the link
key from the Linked File. In order to perform
the link, it is necessary to supply an
expression which will evaluate to the data
values in each of the segments in the target
record. Zoom to the Expression Table, and enter
the required expression.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 32
TASK TABLE
Each Task has a Task Table which displays the
sub-tasks that run under it. It is accessible
either from the Execute Task operation (#7) or
by pressing F8 (Task). Note that by deleting an
entry in the Task Table, the associated task is
deleted. This is the only method of deleting an
entire task. Deleting the Execute Task
operation, however, does not remove the task
itself.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 33
PARAMETER TABLE
This Table is used to specify the parameters
passed to the called program in this Execute
Program operation. Enter as many parameters as
are expected by the called program in the
correct order, type and size. The rule is that
the matching of parameters is done against the
list of virtual fields in the Virtual File, and
not in the order they are selected in the
Execution Table. Therefore, the first parameter
in the calling program will be matched with the
first virtual field in the Virtual File list,
the second with the second, etc.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 34
DISPLAY BLOCKS TABLE
The Display Block Table is used to control all
the relevant parameters needed for the Windows
(On-line, Class = 0) and Report and other
Layouts (Batch, Class > 0). Zooming on the
description column will display the Windows or
Layout.
The first Display Block is always the Task's
Window, and is generated automatically when the
Task is created with these defaults: Display
Description = Task Description, Class=0, 21 Rows
by 78 columns (Full screen). Sub-Tasks start
with 0 rows by 78 columns.
Class:
When you zoom on a specific line in the table,
all the Display Blocks with the same class are
shown together on the screen.
Class = 0 is reserved for Windows. Each task has
one window, which is always the first Display
Block. When zoomed on a Class=0 line, all the
windows are displayed together, allowing an
integrated design.
Other Class numbers are assumed to be Layouts
for Reports and therefore, are displayed without
frames to get the effect of the complete design
layout.
Typ: (Normal/Header/Footer)
If the Class = 0, the Typ parameter is ignored.
In all other cases, the Typ is used for two
purposes:
1. After zooming to the Layout screen, Magic PC
displays first all the Header and the Normal
Blocks successively, and then the Footer Blocks
in reverse order of appearance in the Display
Block Table.
2. At Run-time, if an EOP (End of Page) occurs
when an attempt is made to print a Display Block
with an Automatic Option (* column of Operation
#10 is A), then all the Header Blocks preceding
the current block are automatically displayed on
the next page before the block which caused the
EOP is printed. Normal Blocks are not printed in
this case.
Therefore, a typical usage of Normal Block is
for the detail line, the Header Block for the
report headers, and the Footer Block for totals
and on-change sub-totals.
It is this feature which dictates pairing up
Headers and Footers in the Display Table. In
this way, when a Footer encounters an EOP, only
its own Headers and the ones prior to it (but
not succeeding it) will be printed at the top of
the next page.
Rows/Cols:
This is where you specify the physical
dimensions of the Display Block. The window
frame dimensions could be smaller than the
physical dimensions, and the data will scroll
within it. Expansion or reduction of the size is
done from the bottom and the right hand side
respectively. If the Block is reduced in size,
all fields in the lost areas are lost as well.
In Layout Blocks (Class = 1 or above), all Col
parameters should be equal because the Layout is
printed together. If they are not the same,
Magic PC will assign the largest value to all of
them.
Color:
Zoom to select the default background and
foreground colors for the text used in this
Display Block. The field colors are selected in
the Display Field Screen of each field.
If Class > 0, the color parameter is not used.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 35
SCREEN EDITING
Magic PC has a full screen editor for designing
both Display and Report Layouts.
On the Display screen, text can be typed on the
screen at the cursor position. In addition, to
define a Data Field position, you position the
cursor at the correct spot on the screen, Zoom
into the Field definition window, and choose the
relevant field. Exiting with F9, will insert the
selected variable into the screen layout.
Cursor Positioning:
The Cursor positioning functions use the
Directional keypad in much the same way as
within an application.
The Arrow keys each move the cursor one position
in the respective direction. Ctrl-Right Arrow
and Ctrl-Left Arrow move the cursor four
positions to the right and left respectively.
The Home key moves the cursor to the first
column of the row, while the End key moves to
the last column of the display screen. PgUp
moves to the first row of the screen. PgDn moves
to the Last row.
Backspace deletes to the left of the cursor, and
the Del key deletes the characters at the cursor
position. F3 (Delete) deletes the entire cursor
line. F4 (Create) inserts a line above the
current line, pushing the existing lines down.
Ins is used to switch to Insert Mode, canceling
overwriting.
Alt-B Mark Block:
Use this function to mark the upper left and the
lower right corners of the rectangular block you
want to mark. If a block is already marked, and
you enter Alt-B, a new block is marked using
this last entry. Use Alt-L to mark lines.
Alt-C Center Block:
Centers the highlighted block within the current
frame.
Alt-D Delete Block:
Fills in the highlighted block with blanks.
Alt-F Fill Block:
Prompts for a fill character and fills the
highlighted block with this character.
Alt-L Mark Line:
Marks the line on which the cursor is currently
on. If another line is marked at this time, all
the lines between them are marked and
highlighted. If an area is already marked and
you press Alt-L again, a new area is marked,
using your new entry.
Alt-M Move Block:
Moves the highlighted block to the cursor
position. This position will be the upper left
corner of the new location when moving a
rectangular block (Alt-B). When moving lines
(Alt-L), their new position will start at the
cursor line.
Alt-P Paint Block:
Zooms to the Color Table. When you leave with
F9, the highlighted block will be painted with
your selection. Note that you should paint your
Alt-T area, in order to see a consistent
highlighted line at Runtime. This function is
enabled only for Class 0 blocks.
Alt-R Repeat Block:
Copies the highlighted block to the cursor
position. When a rectangular block is copied
(Alt-B), the cursor position marks the new
block's upper left corner. When lines are copied
(Alt-L), their new position will start under the
cursor line.
Alt-S Show Levels:
Displays the boundaries of the Display Blocks
within the entire screen area. The block names
are not displayed to minimize screen
interference. Press Alt-S to toggle out, or
Alt-X to add the block names. This function is
enabled for non-zero Class only.
Alt-T Mark Task Area:
Designates the highlighted marked area as the
Task Area within the window. This instructs
Magic PC to display each record within the Task
Area and fill the window with as many records as
possible. In the typical case you mark a single
line (Alt-L), paint it solid (Alt-P), and
designate it as the Task Area (Alt-T). Magic PC
displays this window in "Line Mode", displaying
a line for each record. The default Task Area is
the entire window and if a smaller Task Area is
not marked, each record will be displayed in
"Screen Mode", one per screen.
Alt-U Unmark Block:
Cancels the currently highlighted block by
removing the highlight.
Alt-V Verify Block:
Marks a block at the cursor position. This block
is the same size as the current block. This will
verify what will happen if you move the block to
this position. You can prevent overwriting
existing text by using the Alt-V prior to the
Alt-M, or Alt-R.
Alt-W Mark Window Area:
Designates the marked area as the sub-Window
Area within the screen. Typically used when the
Son Task displays its fields in his Father's
window. (Open Window=N in the Son's More Info
screen). In this case, the Alt-W marks a Window
Area within the Father's window. Magic PC will
display the Son's records only inside the Alt-W
area. If you want to display these records in
"Line Mode" you must define an Alt-T within the
Alt-W area.
Alt-X Show Extended Levels:
Displays the boundaries of the Display Blocks
within the entire screen area, including the
block names. Press Alt-X to toggle out, or Alt-S
to delete the block names. This function is
available only for non-zero Class blocks.
Some useful graphic characters for frames:
(Type: Alt-XXX)
213 ╒ ╕ 184
214 ╓ ╖ 183
201 ╔ 196 194 210 209 203 205 ╗ 187
218 ┌── ─ ──┬───╥─ ═╤═══╦══ ═ ──┐ 191
│ ║ │ ║
179 │ │ ║ │ 179
195 ├─ 197─┼─ ──╫─215 ─┤ 180
198 ╞═ │ ║ ═╡ 181
│ ║
186 ║ │ ║ ║ 186
204 ╠═ 216═╪═ ══╬═206 ═╣ 185
199 ╟─ │ ║ ─╢ 182
│ ║ │ ║
192 └── ─ ──┴───╨─ ═╧═══╩══ ═ ──┘ 217
200 ╚ 196 193 208 207 202 205 ╝ 188
211 ╙ ╜ 189
212 ╘ ╛ 190
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 36
WINDOW DESIGN
All the window design tools are made available
by pressing the Scroll Lock (or the Alt =) key
and F1 to open the options menu. To leave any of
the options, press F9 or Scroll Lock.
F1: Scroll Content
The default when Scroll is invoked. It allows
scrolling the data in a window that has a frame
smaller than the physical dimensions. Use the
directional keys to scroll one character at a
time and Ctrl-Arrow to scroll in fast mode (4
characters at a time).
F2: Frame Location
Moves your window to the desired location using
the directional keys.
F3: Frame Size
This option will change the size of the frame up
to the physical size that was determined in the
display block parameter. The top left corner of
the window is fixed. Moving the Left and Up
arrows reduces the size of the frame, while the
Right and Down arrows expand it.
F4: Frame Type
S - Single line frame.
D - Double line frame (Default)
N - No frame (Rarely used - See chapter 11 in
the documentation)
F5 - Frame Color: Displays the color table to
choose a color for the frame.
F6 - Title Color: Displays the color table to
choose a color for the title.
F7 - Define Color: Displays the color table to
allow for color setting.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 37
WINDOW DESIGN
All the window design tools are made available
by pressing the Scroll Lock key and F1 to open
the option menu. To leave any of the options,
press F9 or Scroll Lock.
F1: Scroll Content
The default when Scroll is invoked. It allows
scrolling the data in a window that has a frame
smaller than the physical dimensions. Use the
directional keys to scroll one character at a
time and Ctrl-Arrow to scroll in fast mode (4
characters at a time).
F2: Frame Location
Moves your window to the desired location using
the directional keys.
F3: Frame Size
This option will change the size of the frame up
to the physical size that was determined in the
display block parameter. The top left corner of
the window is fixed. Moving the Left and Up
arrows reduces the size of the frame, while the
Right and Down arrows expand it.
F4: Frame Type
S - Single line frame.
D - Double line frame (Default)
N - No frame (Rarely used - See Documentation)
F5 - Frame Color: Opens the color table to
choose a color for the frame.
F6 - Title Color: Opens the color table to
choose a color for the title.
F7 - Define Color: Displays the color table to
allow for color setting.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 38
COLOR TABLE
The Color Table can be accessed from several
places in the task to "paint" specific areas
(windows, variables, portions of the screen,
frames, title, etc.) Similarly to all the
"banks", once the table is open you can change
the entries in it.
The only entry point to the color table for
definition purposes, without painting anything,
is from the Environment Screen. To change the
color move the cursor to the Foreground (FG) or
Background (BG) column and use the Up/Down
Arrows to select the next combination. You can
type in the number if you know it. All 256
(16x16) combinations are available.
There are 50 entries in this table, all of which
can be changed. It is very important to know,
however, that the first 10 entries are used by
Magic PC as default values for different
subjects:
1. Default for all Text.
2. Default for all Data fields.
3. Default for all Frames.
4. Default for all Frame Titles.
5. Default for Text in pop-up menus and tables.
6. Default for Fields in pop-up menu or tables.
7. Default for Frames in pop-up menu and tables
8. Default for Frame Titles.
9. Function Key display.
10. Function Key display when selected.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 40
DOCUMENTATION
This utility will print the Menus (M), Data
Dictionary files (F), Programs (P), and Help
screens (H) - either in Document form (D) or in
Internal form. In both cases you can elect to
print a single element or a range of elements by
specifying a From/To range. (Zoom to the
relevant table to select the range).
The Document option provides automatic system
documentation for all of Magic PC's elements. It
defaults to the printer (PRN:), but you can send
the output to a disk file, simply by specifying
a file name instead of the PRN:
The Internal option will dump the specific
element into an ASCII file in a coded format.
This ASCII file is useful only when it serves as
an input file to the "Import Dictionary"
utility. Use this option to make copies of
existing Programs or Data Dictionary files, for
example, or to prepare a new XXCTL.DAT file with
only portions of the current control file. If
you choose a range of entries, the entire range
will be sent to the same ASCII file. Magic PC
displays a default file name which you can
change. You have to remember this file name and
enter it as the input file name to the "Import
Dictionary" utility.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 41
DATA DICTIONARY PRINT (OLD)
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 42
PROGRAM PRINT (OLD)
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 43
DICTIONARY IMPORT
This is the option used to import an ASCII file
that was exported previously by the
"Documentation" utility. When importing
programs, they are added to the end of the
corresponding Table.
Enter the name of the file to be imported, and
press F5.
See the Help screen for the "Documentation"
utility for information about the Internal
Documentation option.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 47
INSTALL MENU
This menu provides you with options to customize
your Magic PC installation.
F1> Environment:
This option is used to change the system
parameters. Further Help is available by
entering this option and pressing F10.
F2> Load Help:
This option is used to Load the MGHELP.DAT file
into Magic PC, for the first time. Use this only
when the MGHELP.DAT file has been modified.
F3> Color:
This option is used to control the color
combinations in your version of Magic PC.
Further Help is available by entering this
option and pressing F10.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 48
ENVIRONMENT
Owner Name:
Enter the Owner's name as it should appear in
the upper left corner of the screen and in the
OWNER() Function.
Terminal:
Used in multiuser environment to identify
different users. The function TERM returns the
number stored in this field. Since this
identification is stored in the MGCONST.DAT
file, you can make some application decisions
based on that fact. For example, send output of
report programs to different printers on the
network.
Single/DOS 3.1/Novell: (S)
Used to select a single user mode (S), or if
working in multiuser, select between generic DOS
3.1 LAN support (D), or Novell Advanced NetWare
(N). See chapter 14 for details on multiuser
setup.
Input Password (Y/N):
If Y, then the LOGIN window pops up after the
user enter the System Date in the Entry Screen.
The LOGIN window is used to prompt for the User
ID and password for the application system that
is later selected at the System Menu. It is at
that point (and not upon entry in the LOGIN
window) that the User ID and password are
validated.
If set to N, the LOGIN window does not pop up,
and the user is therefore not prompted for the
User ID and Password which are assigned to
blanks as a result. Only if the User ID Table is
empty, or at least one entry was set to a Blank
User ID, and Blank password, - will the user be
able to enter the application system. Otherwise,
the "Illegal Password" error massage will be
displayed, and entry denied.
Command Processor:
The name and path of the DOS level processor.
Magic PC looks for this file in the specified
directory for external processing and in User
Exit Operations.
Editor:
Enter here the program name of a text editor or
a text oriented word processor. Magic PC will
automatically load this program when you press
the F8 (Edit) key while in the Help screen or
Scan File operation. You may then use this
editing program to design your screen, and upon
saving the temporary file (MGTEMP.DAT) and
terminating the editor, the content will be
transferred to the Magic PC screen.
Lock File Directory:
A DOS path specification to a directory that
will contain Magic PC's multiuser lock files,
MGFLOCK.DAT and MGRLOCK.DAT. (The MGRLOCK.DAT
file is used only if you are working with the
generic DOS 3.1 specification; the Novell
environment does not use the MGRLOCK.DAT file).
It is best to define this directory in a Virtual
Disk on the network server. This improves
performance due to the frequent access to the
lock files which is much faster in memory than
disk.
European/American Date (A/E):
Select American (MM/DD/Y) or European (DD/MM/YY)
Separators: (Thousand, Date, Time):
The characters used to separate the components
of these fields. The defaults are , / :
respectively.
Printer Page Size: (60)
The default count of lines-per-page when output
is sent to the printer or a disk file. It could
be modified within the program in the I/O table
(More Info Screen) or at runtime with the Files
option. The default setup is 60 lines per page.
If output is sent to the CONSOLE (or CON:), the
default size is 24.
Start System:
If you wish to automatically select a specific
Application System without displaying the System
Menu at all, enter the entry number of that
application as it is shown in the System Menu.
Save Screen Seconds:
If the current screen has not been modified for
as many seconds as specified in this parameter,
the screen will be cleared. This helps prevent
damaging the monitor. Any keyboard entry will
re-display the screen and will be used as an
input character. The default zero entry, causes
the screen to be displayed at all times.
Low Memory / Beep Options: (2)
Magic PC warns you when the amount of available
memory is reaching a dangerously low level which
could cause a system crash if you continue to
request more memory. The warning is a series of
beeps which continue as long as memory is too
low. At this point you must pop back a level,
typically by leaving the current Task, and the
beeps will stop. The options are:
0 - Beep is off. No beeps are sounded.
1 - Memory only. The beeps are only used to
warn about low memory. All other beeps are
disabled.
2 - Memory and Normal. Beep is used for both
normal activities
3 - Beep is used for normal activities only.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 50
AUTHORIZATION
To control access to the application components
you can assign a group number for each of the
possible functions: Create, Modify, Delete,
Query, and Execute (for Programs only). A user
may execute one of these functions if his Group
Number is less than or equal to the entry's
Group Number. Note that the Create authorization
refer to creating new entries in the table, and
it is repeated on all of the lines for
convenience. A user can change group numbers of
all entries which were set to his group level
(or above), to a higher (or equal) level only.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 51
HELP SCREENS
Four levels of help are available: The first
time the user presses F10, Magic PC will display
the help window for the current field. The
second F10 will display the global help window
for the Task, the third will display the User
Option help from the MGHELP.DAT file, and the
fourth will display the How to Use Help section,
also from the MGHELP.DAT file. As always, F9
will pop back one level at a time. (Note that
Batch Tasks have only three levels of help. The
field level is not applicable).
To implement these features, you can define one
Task Help and one help window for every selected
field. The help windows are defined in a table,
much like the Display Blocks, with the exception
that they are global to the entire system and
not to any particular Task. They are available
by selecting F4 in the Design Options Menu, or
within the Task, from any Display Block screen
by pressing F8. The default size is 21X50.
Change the content size to fit your
requirements, and Zoom to enter the help text.
Magic PC automatically displays "Page x of y".
Max size for any help screen is 32K.
Note that from the help screen you can press F8
(Edit) and exit to your favorite editor as
defined in the Environment Screen. Magic PC
creates a temporary file (MGTEMP.DAT) and passes
it to the editor. To return to Magic PC, save
the file and leave the editor. All the Magic PC
editing facilities (except Alt-T and Alt-W) are
available for the help screen.
To assign a help screen to a particular field,
press F8 while the cursor is on the field mask.
To assign a global help screen to the Task,
press F8 from any non-masked (text) point on the
screen. An alternative to the assignment of the
Task level help is to Zoom on the Task Help
entry in the More Info screen and pick one of
the Help Screens from the Help Table. If any of
the two levels are not defined, they are skipped
in the sequence of pressing F10 at runtime.
@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 52
SECURITY: USER ID, PASSWORD, AUTHORIZATION
Magic PC's security features enable you the
flexibility of deciding who can access the Data
Dictionary, Program Dictionary and Help screens.
You also have control over who can run (execute)
a given program.
Choosing F5 from the Design Options Menu will
display the User ID Table. Here you can define
the User ID, its Password and its Group Number.
The Groups are hierarchical: Group 0 is the
"strongest" and 999 is the "weakest". In
general, if an authorization is granted to level
10 as an example, then all User IDs that have
their group defined in this table as 10 or less,
will be authorized for the particular activity.
Let's use the following table as an example:
User ID Password Group
------- -------- -----
OWNER PASS1 0
DEALER PASS2 10
DBA PASS3 20
USER1 PASS4 30
USER2 PASS5 30
This assumes that one User ID was allocated with
the strongest authorization, (0), one for the
dealer, one for the Database Administrator and
two for the end-users.
If you set the Input Password entry in the
Environment Screen to Yes, the LOGIN window will
be displayed upon entering Magic PC, and the
user will be prompt for the User ID and
Password, which will be validated upon selecting
a system in the System Menu (See the Environment
Screen Help).
Once entered, the user can perform any
authorized activity: Create, Modify, Delete,
Query and Execute either Programs, Data
Dictionary files or Help Screens - only if the
authorized group number which was assigned to
the given entity is equal-to or greater-than
the user's group number.
For example: If the user is a DBA from the table
above, all authorized activities with group
authority of 20 and above - are permitted for
this user. The authorization group number was
given using the F6 (Auth) key which is available
at the Program Table, Data Dictionary Table, and
the User Help Screen Table. In fact, any user
can change the authorization group number of
entries which currently have group numbers
equal-to or greater-than his own group number,
to his own group number, or a higher number.
Using the example above, the DBA can reset
authorization group number of all entries which
currently are assigned to group 20 or above, to
20 or a higher number.
A user can create new entries in the User ID
table, and assign them a group number at least
one higher than his own. The user can change his
own password, but not his own User ID. All User
IDs with group numbers lower than the user's
group number - are masked with * to ensure
security.
Group 0 is unique in the respect that it has no
restriction what-so-ever with the entire
application. Make sure you have at least one
group 0 entry in the User ID table, if you want
to ever change any authorization entries that
were assigned to group 0.